package com.lcf.system.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.lcf.framework.annotation.DictFile;
import com.lcf.framework.annotation.DictTable;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.math.BigDecimal;
import java.time.LocalDate;
import java.util.List;

/**
 * 团购规则(SysTenantRule)表实体类
 *
 * @author lcf
 * @since 2025-05-02 11:55:03
 */
@Data
@NoArgsConstructor
public class SysTenantRuleVO {
    //id
    @Schema(description = "id")
    private Long id;
    //团长id
    @Schema(description = "团长id")
    @DictTable(tableName = "sys_user", primaryKey = "id", fields = {"name"}, nameField = {"userName"})
    private Long userId;
    //团长姓名
    @Schema(description = "团长姓名")
    private String userName;
    //商品id
    @Schema(description = "商品id")
    @DictTable(tableName = "goods", primaryKey = "id",
            fields = {"goods_name", "goods_img", "goods_price","goods_spec"},
            nameField = {"goodsName", "goodsImg", "goodsPrice", "goodsSpec"})
    private Long goodsId;
    //商品名称
    @Schema(description = "商品名称")
    private String goodsName;
    //商品封面
    @Schema(description = "商品封面")
    @DictFile
    private String goodsImg;
    //商品价格
    @Schema(description = "商品价格")
    private BigDecimal goodsPrice;
    //规格
    @Schema(description = "规格")
    private String goodsSpec;
    //活动名称
    @Schema(description = "活动名称")
    private String ruleName;
    //开始时间
    @Schema(description = "开始时间")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private LocalDate startTime;
    //结束时间
    @Schema(description = "结束时间")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private LocalDate endTime;
    //状态1未开始2进行中3已结束
    @Schema(description = "状态1未开始2进行中3已结束")
    private Integer status;
    //商品数量
    @Schema(description = "商品数量")
    private Integer goodsNum;
    //当前满足规则明细id
    @Schema(description = "当前满足规则明细id")
    private Long detailId;
    //是否下单1是0否
    @Schema(description = "是否下单1是0否")
    private Integer isOrder;
    //规则明细
    @Schema(description = "规则明细")
    private List<RoleDetailVO> detailList;
    //是否报名
    @Schema(description = "是否报名1是0否")
    private Integer isSign;
    //已报名人数
    @Schema(description = "已报名人数")
    private Integer signNum;
}

